﻿#pragma once

#include "../common.h"
#include "../effect.h"

namespace anip
{
	class Shader;
	class Context;
	class Texture2D;
	class RenderBuffer;

	class FixedGaussianBlurEffect : public Effect
	{
	private:
		Shader* _shader;
		RenderBuffer* _target;
		int _step, _iter;
		string _name;

	public:
		static const int pInput = 0;
		static const int pOutput = 0;

		FixedGaussianBlurEffect(int step = 3);

		const string name() const { return _name; }

		const ParameterInfo& inputs()
		{
			static const string texNames[1] = { "input" };
			static const ParameterInfo info = {
				0, 0, 0, 0, 0, 1,
				nullptr, nullptr, nullptr, nullptr, nullptr, texNames
			};
			return info;
		}

		const ParameterInfo& outputs()
		{
			static const string texNames[1] = { "output" };
			static const ParameterInfo info = {
				0, 0, 0, 0, 0, 1,
				nullptr, nullptr, nullptr, nullptr, nullptr, texNames
			};
			return info;
		}

		void initialize();

		void process(const Context& cxt);

		void finalize();
	};

	
}